-
Notifications
You must be signed in to change notification settings - Fork 0
#135 - 익명 프로필 조회 기능을 구현합니다. #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the anonymous profile viewing feature and related endpoints. Key changes include:
- Adding query methods and persistence support for anonymous message rooms.
- Enhancing domain models (User, UserProfile, MessageV2, etc.) to support anonymous profile logic.
- Introducing new API endpoints/controllers and a service for retrieving anonymous profiles.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
infrastructure/mysql/src/main/kotlin/com/wespot/message/v2/MessageV2PersistenceAdapter.kt | Introduces a new repository method to fetch message rooms by sender and receiver IDs. |
infrastructure/mysql/src/main/kotlin/com/wespot/message/v2/MessageV2JpaRepository.kt | Adds a query to fetch messages with a null messageRoomId filtered by sender and receiver. |
domain/src/main/kotlin/com/wespot/user/User.kt | Overrides equals and hashCode to compare User instances based solely on id. |
domain/src/main/kotlin/com/wespot/message/v2/UserProfiles.kt | Implements logic to filter and sort anonymous profiles with error handling. |
domain/src/main/kotlin/com/wespot/message/v2/UserProfile.kt | Creates a UserProfile with support for anonymous profiles using a custom null check. |
domain/src/main/kotlin/com/wespot/message/v2/MessageV2.kt | Adds methods to compare user and anonymous profiles. |
domain/src/main/kotlin/com/wespot/message/v2/MessageRooms.kt | Adds a viewer() method that ensures there is exactly one viewer in the message rooms. |
domain/src/main/kotlin/com/wespot/message/v2/MessageRoom.kt | Adds helper methods to check answer eligibility and anonymous profile associations. |
domain/src/main/kotlin/com/wespot/message/v2/MessageDetails.kt | Adds a method to determine if any message in the details is answerable. |
core/src/main/kotlin/com/wespot/message/service/v2/GetAnonymousProfileService.kt | Implements the service to fetch anonymous profiles for a receiver. |
app/src/main/kotlin/com/wespot/user/CreatedAnonymousProfileController.kt & app/src/main/kotlin/com/wespot/message/v2/GetAnonymousProfileController.kt | Updates/restructures API routing for anonymous profile creation and retrieval. |
Comments suppressed due to low confidence (2)
domain/src/main/kotlin/com/wespot/user/User.kt:304
- [nitpick] Overriding equals and hashCode in this data class to compare only the id deviates from the default behavior; consider adding a clarifying comment on why only the id is used to define equality.
override fun equals(other: Any?): Boolean { ... }
app/src/main/kotlin/com/wespot/user/CreatedAnonymousProfileController.kt:12
- [nitpick] The renaming to 'CreatedAnonymousProfileController' may lead to confusion about this controller's responsibility; consider aligning the name with its functionality regarding anonymous profile creation.
class CreatedAnonymousProfileController(
@@ -36,4 +36,8 @@ data class MessageDetails( | |||
return messages | |||
} | |||
|
|||
fun isAbleToAnswer():Boolean{ | |||
return messages.any { it.isAbleToAnswer } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method isAbleToAnswer appears to be a function and should be invoked (e.g., it.isAbleToAnswer()) rather than referenced as a property.
return messages.any { it.isAbleToAnswer } | |
return messages.any { it.isAbleToAnswer() } |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope i don't want
} | ||
|
||
fun recentlyTalk(): LocalDateTime? { | ||
if (messageRoom == EMPTY_MESSAGE_ROOM) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using an EMPTY_MESSAGE_ROOM constant set to null adds an extra layer of indirection; consider checking messageRoom directly for null to improve clarity.
if (messageRoom == EMPTY_MESSAGE_ROOM) { | |
if (messageRoom == null) { |
Copilot uses AI. Check for mistakes.
1. 🔗 관련 이슈
closes #135
2. 📄 구현한 내용 또는 수정한 내용
5. ✅ 배포 Checklist